package 抽象工厂模式;

public class ColorFactory implements MaxFactory {
    @Override
    public Color getColor(Class colorType) {
        if (colorType.getTypeName().equals("抽象工厂模式.Red")) {
            return new Red();
        } else if (colorType.getTypeName().equals("抽象工厂模式.Green")) {
            return new Green();
        }
        return null;
    }

    @Override
    public Shape getShape(Class shapeType) {
        return null;
    }
}
